<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>生活小贴士 开心每一天</title>
    <style>
        :root {
            --primary: #00f2ea;
            --secondary: #ff0050;
            --bg-dark: #0f0f13;
            --glass: rgba(255, 255, 255, 0.05);
            --border: rgba(255, 255, 255, 0.1);
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
        }

        body {
            background-color: var(--bg-dark);
            color: white;
            height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            overflow: hidden;
            position: relative;
        }

        /* 动态背景光斑 */
        .orb {
            position: absolute;
            border-radius: 50%;
            filter: blur(80px);
            z-index: 0;
            animation: float 10s infinite ease-in-out;
            opacity: 0.6;
        }
        .orb-1 { width: 300px; height: 300px; background: var(--secondary); top: -50px; left: -50px; }
        .orb-2 { width: 400px; height: 400px; background: var(--primary); bottom: -100px; right: -100px; animation-delay: -5s; }

        @keyframes float {
            0%, 100% { transform: translate(0, 0); }
            50% { transform: translate(30px, 50px); }
        }

        /* 主容器：玻璃拟态 */
        .container {
            position: relative;
            z-index: 10;
            width: 90%;
            max-width: 500px;
            background: var(--glass);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border: 1px solid var(--border);
            border-radius: 24px;
            padding: 40px;
            box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
            text-align: center;
            transition: transform 0.3s ease;
        }

        .container:hover {
            transform: translateY(-5px);
            box-shadow: 0 30px 60px -12px rgba(0, 242, 234, 0.15);
        }

        h1 {
            font-size: 1.5rem;
            letter-spacing: 4px;
            text-transform: uppercase;
            margin-bottom: 30px;
            background: linear-gradient(90deg, var(--primary), #fff);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            font-weight: 800;
        }

        /* 标签 */
        .tag {
            display: inline-block;
            padding: 6px 12px;
            border-radius: 20px;
            font-size: 0.8rem;
            font-weight: 600;
            background: rgba(255, 255, 255, 0.1);
            color: var(--primary);
            margin-bottom: 20px;
            border: 1px solid var(--primary);
            box-shadow: 0 0 10px rgba(0, 242, 234, 0.2);
        }

        /* 内容区域 */
        .content-area {
            min-height: 120px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 30px;
        }

        #tip-text {
            font-size: 1.25rem;
            line-height: 1.6;
            font-weight: 300;
            opacity: 0; /* 初始隐藏用于动画 */
            transform: translateY(10px);
            transition: all 0.5s ease;
        }
        
        #tip-text.show {
            opacity: 1;
            transform: translateY(0);
        }

        /* 按钮样式 */
        button {
            background: transparent;
            color: white;
            border: 2px solid var(--secondary);
            padding: 15px 40px;
            font-size: 1rem;
            font-weight: bold;
            border-radius: 50px;
            cursor: pointer;
            position: relative;
            overflow: hidden;
            transition: all 0.3s ease;
            text-transform: uppercase;
            letter-spacing: 2px;
            box-shadow: 0 0 15px rgba(255, 0, 80, 0.3);
        }

        button:hover {
            background: var(--secondary);
            box-shadow: 0 0 30px rgba(255, 0, 80, 0.6);
            transform: scale(1.05);
        }

        button:active {
            transform: scale(0.95);
        }

        .footer {
            margin-top: 20px;
            font-size: 0.7rem;
            color: rgba(255, 255, 255, 0.4);
        }

    </style>
</head>
<body>

    <div class="orb orb-1"></div>
    <div class="orb orb-2"></div>

    <div class="container">
        <h1>Life.Hack // System</h1>
        
        <div id="category" class="tag">系统就绪</div>

        <div class="content-area">
            <p id="tip-text">点击下方按钮，获取今日份的生存指南。</p>
        </div>

        <button onclick="generateTip()">生成 Hack</button>
        
        <div class="footer">POWERED BY AI </div>
    </div>

    <script>
        // 生活小贴士数据库
        const tips = [
            { category: "⚡ 效率", text: "如果在两分钟内能完成一件事，现在就去做，不要拖延。" },
            { category: "🧠 心理", text: "当你感到焦虑时，尝试'4-7-8'呼吸法：吸气4秒，憋气7秒，呼气8秒。" },
            { category: "💻 科技", text: "使用 'Windows + V' (Win) 或第三方工具开启剪贴板历史，这会改变你的工作流。" },
            { category: "💰 省钱", text: "去超市购物前先吃饱。饥饿会让你买下很多不需要的垃圾食品。" },
            { category: "😴 健康", text: "睡前90分钟洗个热水澡，体温下降的过程会让你更快入睡。" },
            { category: "🏠 生活", text: "用旧报纸擦玻璃比用毛巾更干净，而且不会留下毛絮。" },
            { category: "🎓 学习", text: "费曼学习法：如果你不能简单地解释它，那你就是没真正听懂。试着教给别人看。" },
            { category: "🔑 密码", text: "不要在所有网站用同一个密码。使用Bitwarden或1Password等密码管理器。" },
            { category: "🍳 烹饪", text: "切洋葱时嚼口香糖或者点一支蜡烛，可以有效防止流泪。" },
            { category: "✈️ 旅行", text: "在浏览器使用'无痕模式'搜索机票，防止大数据杀熟涨价。" },
            { category: "🔋 电池", text: "手机锂电池电量保持在20%-80%之间，能最大程度延长电池寿命。" },
            { category: "👕 衣物", text: "白衬衫发黄？试着在洗涤前用柠檬汁浸泡15分钟。" }
        ];

        const textElement = document.getElementById('tip-text');
        const categoryElement = document.getElementById('category');

        // 页面加载时显示
        setTimeout(() => {
            textElement.classList.add('show');
        }, 100);

        function generateTip() {
            // 1. 移除动画类
            textElement.classList.remove('show');
            
            // 2. 短暂延迟后切换内容并重新显示（制造切换效果）
            setTimeout(() => {
                const randomIndex = Math.floor(Math.random() * tips.length);
                const tip = tips[randomIndex];

                // 更新内容
                categoryElement.innerText = tip.category;
                textElement.innerText = tip.text;
                
                // 3. 重新添加动画类
                textElement.classList.add('show');
            }, 300);
        }
    </script>
</body>
</html>